﻿
<?php $form=$this->beginWidget('CActiveForm', array(
	//'action'=>Yii::app()->createUrl($this->route),
	'action'=>Yii::app()->createUrl('/job/searchAdvanceJob'),
	'method'=>'get',
)); 
?>
<!-- Thanh tim kiem don gian -->
<tr>
	<td>
		<b>Tìm kiếm dự án: </b><br /><?php echo $form->textField($model,'jobdesc', array('size'=>80, 'maxlength'=>200));?>
		<div class="form"><div class="row"><div class="hint">Nhập từ khóa hoặc Mã dự án </div></div></div>
		<b>See more: </b>
		<br ><br >
		<?php 
			echo '<div class="search-form">';
			echo CHtml::submitButton('Find Project');
			echo '</div><!-- search-form -->'; 
		?>
	</td>
</tr><!--End-->

<!--Thanh tim kiem nang cao-->
<?php
	Yii::app()->clientScript->registerScript('search', "
			$('.search-button').click(function(){
				$('.search-form').toggle();
				return false;
			});
			$('.search-form form').submit(function(){
				$.fn.yiiGridView.update('job-grid', {
					data: $(this).serialize()
				});
				return false;
			});
			");
	echo CHtml::link('[Search Advance]','#',array('class'=>'search-button'));
	echo '<div class="search-form" style="display:none">';
 ?>
 <hr />
	<tr valign="top">
		<td align="left" nowrap="nowrap">
			<b> </b>
				<div class="row">
					<?php echo $form->labelEx($model,'subjobtype_id'); ?>
					<?php echo $form->dropDownlist($model,'subjobtype_id',$model->getJobType(), array('prompt' => 'Chọn một lĩnh vực')); ?>
					<?php echo $form->error($model,'subjobtype_id'); ?>
				</div>
		</td>
		<td>
			<b></b>
				<div class="row">
					<?php echo $form->labelEx($model,'status'); ?>
					<?php echo $form->dropDownlist($model,'status',$model->getProjectStatus()); ?>
					<?php echo $form->error($model,'status'); ?>
				</div>
		</td>
		<td align="left" nowrap="nowrap">
			
			<table>
				<tbody>
					<tr>
						
						<td>
							<div class="row">
								<?php //echo $form->dropDownlist($model,'budget_id',$model->getMoneyType(), array('prompt' => 'Chọn khoảng tiền')); ?>
								<?php //echo $form->error($model,'budget_id'); <td>Min</td><b>Giá Tiền </b>  ?>
							</div>
						</td>
					</tr>
					<tr>
						
						<td> 
							<div class="row">
								<?php //echo $form->dropDownlist($model,'budget_id',$model->getMaxUSD()); <td>Max</td>  ?>
								<?php //echo $form->error($model,'budget_id'); ?>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</td>
		<td>
			<b></b>
				<div class="row">
					<?php //echo $form->labelEx($model,'biddingperiod'); ?>
					<?php //echo $form->dropDownlist($model,'biddingperiod',$model->getBidperiod()); ?>
					<?php //echo $form->error($model,'biddingperiod'); ?>
				</div>
		</td>
	</tr>
	<?php echo CHtml::submitButton('Find Project'); ?>

	<?php echo '</div><!-- search-form -->'; //$this->widget('application.components.Job.ViewTypeJob');  ?>

<?php $this->endWidget(); ?>